package com.siriframe.config;


import com.siriframe.service.QueueService;
import com.siriframe.service.impl.RocketMQMessageSender;
import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;


public class MessageSenderConfig {

    @Bean
    @ConditionalOnProperty(name = "rocketmq.name-server")
    public QueueService rocketMQMessageSender(RocketMQTemplate rocketMQTemplate) {
        return new RocketMQMessageSender(rocketMQTemplate);
    }

}
